package com.demo.controller;

import com.demo.entity.test1.Users;
import com.demo.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("demo")
@Api(description = "用户管理")
public class UsersController {
    @Autowired
    private UserService userService;

    @GetMapping("test")
    @ApiOperation(value = "查询所有用户")
    public List<Users> show(){
        return userService.demo();
    }
}
